<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSettingGainsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('setting_gains', function (Blueprint $table) {
            $table->id();
            $table->integer('setting_id')->unsigned()->comment('系统配置setting表id');
            $table->tinyInteger('default_red_ratio')->unsigned()->default(0.00)->comment('默认红包手续费百分比');
            $table->tinyInteger('image_red_ratio')->unsigned()->default(0.00)->comment('图片红包手续费百分比');
            $table->tinyInteger('video_red_ratio')->unsigned()->default()->comment('视频红包手续费百分比');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('setting_gains');
    }
}
